import { lazy } from "react";
import { QueueIcon } from "tdesign-icons-react";
import { IRouter } from "../index";

const result: IRouter[] = [
  {
    path: "/room",
    meta: {
      title: "预约审批",
      Icon: QueueIcon,
      requiredRole: "user",
    },
    children: [
      {
        path: "reverse",
        Component: lazy(() => import("@/pages/Form/UserReverse")),
        meta: {
          title: "预约包间",
          requiredRole: "user",
        },
      },
      {
        path: "reverseList",
        Component: lazy(() => import("@/pages/List/ApproveList")),
        meta: {
          title: "我的预约",
          requiredRole: "user",
        },
      },
      {
        path: "approveList",
        Component: lazy(() => import("@/pages/List/ApproveList")),
        meta: {
          title: "审批列表",
          requiredRole: "admin",
        },
      },
      {
        path: "approve",
        Component: lazy(() => import("@/pages/Form/UserReverse")),
        meta: {
          title: "管理员审批",
          hidden: true, // 隐藏在菜单栏中，不显示在左侧导航栏中
          requiredRole: "admin",
        },
      },
    ],
  },
];

export default result;
